﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FarseerPhysics.Dynamics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace RacePlatformer.Object
{
    public class BoxObject : GameObject
    {
        /// <summary>
        /// Object which functions as a box
        /// </summary>
        /// <param name="maingame">The 'MainGame.cs' class that needs to be passed</param>
        /// <param name="world">The world class that needs to be passed, is required to create objects and fixtures</param>
        /// <param name="size">the size of the object</param>
        /// <param name="position">the position of the object(in normal units)</param>
        /// <param name="bodytype">the bodytype of the object</param>
        /// <param name="mass">the mass of the object</param>
        public BoxObject(MainGame maingame, World world, Vector2 size, Vector2 position, BodyType bodytype, float mass,int levelID)
            : base(maingame, world, size, position, bodytype, mass,levelID)
        {
            this.body.FixedRotation = false;
            this.body.Friction = 0f;
            this.body.Restitution = 0f;
            this.body.LinearDamping = 2.0f;
            this.layer = 0.5f;
        }
        public override void LoadContent()
        {
           texture = maingame.Content.Load<Texture2D>("Objects/darkcrate");
        }
    }
}
